const showLog = (key, value1, value2) => {
  if (value2) {
    console.log(key + value1, value2)
  } else {
    console.log(key, value1)
  }
}

/**
 * 打日志的工具类
 * @type {{warn: LogUtils.warn, log: LogUtils.log, error: LogUtils.error}}
 */
const LogUtils = {
  log: (value1, value2) => {
    showLog('~~~~~~LOG=>~~~', value1, value2)
  },
  warn: (value1, value2) => {
    showLog('~~~~~~WARN=>~~~', value1, value2)
  },
  error: (value1, value2) => {
    showLog('~~~~~~ERROR=>~~~', value1, value2)
  }
}

export default LogUtils
